package cloud.seri.iot.aliyun.service.mapper

import cloud.seri.iot.common.model.*
import com.aliyuncs.iot.model.v20180120.*
import org.mapstruct.Mapper
import org.mapstruct.Mapping

@Mapper(componentModel = "spring", uses = [])
interface DeviceRequestMapper
{
    fun getRegisterDeviceRequest(dto: RegisterDevice): RegisterDeviceRequest

    @Mapping(target = "productKey", source = "pk")
    fun getQueryDeviceRequest(dto: QueryDeviceDTO): QueryDeviceRequest

    fun getQueryDeviceDetailRequest(dto: DeviceDTO): QueryDeviceDetailRequest

    fun getQueryDeviceRequest(dto: PageRequestDTO): QueryDeviceRequest

    fun getDeleteDevice(dto: DeviceDTO): DeleteDeviceRequest

    fun getDeviceStatusRequest(dto: DeviceDTO): GetDeviceStatusRequest

    fun batchGetDeviceStateRequest(dto: DevicesDTO): BatchGetDeviceStateRequest

    fun getDisableThinRequest(dto: DeviceDTO): DisableThingRequest

    fun getEnableThingRequest(dto: DeviceDTO): EnableThingRequest
}
